<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ez="http://java.sun.com/jsf/composite/demo"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/common.xhtml">

	<ui:define name="pageHeader">
			Usuários
		</ui:define>

	<ui:define name="mainSection">
		<div class="twelve columns">
			<h:form>
				<p:messages id="messages" showDetail="true" autoUpdate="true"
					closable="true" />
				<!-- NEW GROUP -->

				<p:panel>

					<p:commandButton value="Excluir" action="#{sysUserMB.delete()}" update="userList"/>
					<p:dataTable value="#{sysUserMB.findAll()}" var="user"
						selection="#{sysUserMB.selectedUsers}" rowKey="#{user.id}" id="userList">

						<p:column selectionMode="multiple" style="width:2%" />

						<p:column headerText="Usuarios">
							<h:outputText value="#{user.fullName}" />
						</p:column>

						<div style="clear: both" />
					</p:dataTable>

				</p:panel>
			</h:form>
		</div>
	</ui:define>

</ui:composition>
</html>